package org.ninjarope.cinderstained.main.gameplay;

import org.ninjarope.cinderstained.main.engine.Game;
import org.ninjarope.cinderstained.main.gameplay.definition.GameActor;
import org.ninjarope.cinderstained.main.gameplay.definition.GameTerrain;
import org.ninjarope.cinderstained.main.gameplay.definition.Stat;
import org.ninjarope.cinderstained.main.gameplay.definition.damage.Damage;
import org.ninjarope.cinderstained.main.gameplay.definition.pool.Pool;
import org.ninjarope.cinderstained.main.gameplay.definition.pool.PoolMember;

public class Summon extends GameActor implements PoolMember<Summon> {
	public float nextAttack = 0;

	public int level;
	public Stat health;

	public Stat attackSpeed;
	public Stat moveSpeed;
	public Stat range;
	public Damage dmg;


	public Summon() {
		super();
		Pool<Stat> p = Game.pools("stats");
		level = 1;
		health = p.request();
		attackSpeed = p.request();
		moveSpeed = p.request();
		range = p.request();
		dmg = (Damage) Game.pools("damage").request();
		nextAttack=0;
	}

	@Override
	public Summon assimilate(Summon def) {
		this.level = def.level;
		this.health.copy(def.health);
		this.attackSpeed.copy(def.attackSpeed);
		this.moveSpeed.copy(def.moveSpeed);
		this.range.copy(def.range);
		this.dmg.copy(def.dmg);
		return this;
	}

	@Override
	public void onBirth() {

	}

	public void onBirth(Summon summon) {

	}

	@Override
	public void onTakeDamage(GameActor[] attacker) {

	}

	@Override
	public void onWalk(GameTerrain terrain) {

	}

	@Override
	public void onTick() {

	}

	@Override
	public void onStep() {

	}

	@Override
	public boolean onDeath() {
		return true;

	}

	public boolean onDeath(Summon summon) {
		return true;

	}

	@Override
	public void onAttack(Damage dmg) {

	}

	
}
